Skip to main content

Introduction

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

Helium uses composer to install WordPress plugins.

Composer contains 2 files for setting:

  • composer.json - config package (this file contains the main settings)
  • composer.lock - full config (generated automatically)

How to install Composer install locally

https://getcomposer.org/download/

Adding new plugin

composer require <package> <version> - adding new plugin in composer. The plugin should not be in a private repository, this is a command to add plugins from open sources, for example https://wpackagist.org/

You should see the plugin added to the "require" section and the composer.lock file updated as well. After this command, the plugin is automatically downloaded

Example:

  • composer require wpackagist-plugin/custom-post-type-permalinks 3.4.5

Command

composer install - install all package form composer.json

Access control

There are quite a few public plugins and packages that the composer installs that don't require access, but some plugins are kept in private repositories. In order to work with the Helium project, your public SSH needs to be added to a private repository. For this you need to write mark@dreamersofday.co or valera@dreamersofday.co

Help

If you have any questions or problems with this part of the work, you need to write to Slack @Valera Vilks